package com.ytxg.health_management.util;

import java.util.Random;

public class RandomUsernameGenerator {
    private static final String[] FIRST_NAMES = {"星月", "夜影", "晨曦", "流云", "飞雪", "落花", "风铃", "静思", "墨舞", "青烟"};
    private static final String[] LAST_NAMES = {"子", "云", "若", "梦", "清", "寒", "墨", "流", "风", "雨"};
    private static final String[] SUFFIXES = {"_01", "_02", "_03", "_04", "_05", "_06", "_07", "_08", "_09", "_10"};

    private static final Random RANDOM = new Random();

    /**
     * 生成一个随机网名
     * @return 随机网名
     */
    public static String generateRandomUsername() {
        String firstName = FIRST_NAMES[RANDOM.nextInt(FIRST_NAMES.length)];
        String lastName = LAST_NAMES[RANDOM.nextInt(LAST_NAMES.length)];
        String suffix = SUFFIXES[RANDOM.nextInt(SUFFIXES.length)];

        return firstName + lastName + suffix;
    }


}
